<?php

//////////////////////////////////////////////////////////
//    Боковая панель                                    //
//////////////////////////////////////////////////////////


if ($user_id) {

    echo '<div class="lphdr"><b>Меню</b></div>';
    echo '<div class="smenu">';
    if ($rights >= 1)
        echo '<img src="' . $set['homeurl'] .
            '/images/pt.gif" border="0" alt="" title="Админ" /><span class="red"><a href="../' .
            $set['admp'] . '/index.php"><b>' . $lng['admin_panel'] . '</b></a></span><br />';
    echo '<img src="' . $set['homeurl'] .
        '/images/contacts.png" border="0" alt="" title="Больше" /> <a href="' . $set['homeurl'] .
        '/users/profile.php?act=office">Личный Кабинет</a><br />';
    echo '<img src="' . $set['homeurl'] .
        '/images/settings.png" border="0" alt="" title="Настройки" /> <a href="' . $set['homeurl'] .
        '/users/profile.php?act=settings">Настройки</a><br />';
    echo '<img src="' . $set['homeurl'] .
        '/images/activity.gif" border="0" alt="" title="Статистика" /> <a href="' . $set['homeurl'] .
        '/users/profile.php?act=stat">Статистика</a><br />';
    echo '<img src="' . $set['homeurl'] .
        '/images/guestbook.gif" border="0" alt="" title="Гостевая" /> <a href="' . $set['homeurl'] .
        '/users/profile.php?act=guestbook">Гостевая</a><br />';
    echo '<img src="' . $set['homeurl'] .
        '/images/users.png" border="0" alt="" title="Контакты" /> <a href="' . $set['homeurl'] .
        '/mail/?act=contacts">Контакты</a><br />';
    echo '<img src="' . $set['homeurl'] .
        '/images/admin.png" border="0" alt="" title="Выход" /> <a href="' . $set['homeurl'] .
        '/exit.php">Выход</a><br />';
    echo '</div>';

} else {
    echo '<div class="lphdr">Авторизация</div>';
    echo '<div class="sidepad">';
    echo '<form action="' . $set['homeurl'] . '/login.php" method="post">' . $lng['login_name'] .
        ':<br/>' . '<input type="text" name="n" value="" maxlength="20" size="15" /><br/>
	' . $lng['password'] . ':<br/>
	<input type="password" name="p" maxlength="20" size="15" /><br />
	<input type="checkbox" name="mem" value="1" checked="checked"/>' . $lng['remember'] .
        '<br />
	<input type="submit" value="' . $lng['login'] . '"/></form>';
    echo '</div>';
    echo '<div class="sidepad">';
    echo '<a href="' . $set['homeurl'] . '/users/skl.php?continue">' . $lng['forgotten_password'] .
        '?</a><br /><a href="' . $set['homeurl'] . '/registration.php">' . $lng['registration'] .
        '</a>';
    echo '</div>';

}


/* YouTube channel! */
echo '<div class="lphdr"><b>YouTube</b></div>';

//Быдлокодец
$yt_number = range(0, 6);
$yt_images = array(
    "http://i2.ytimg.com/vi/Y2tkLuq5qTc/default.jpg",
    "http://i4.ytimg.com/vi/KHF65RQaX4M/default.jpg",
    "http://i3.ytimg.com/vi/2eb338EDxhI/default.jpg",
    "http://i2.ytimg.com/vi/mjI9bgmDfR0/default.jpg",
    "http://i3.ytimg.com/vi/RfMl4UMT04Y/default.jpg",
    "http://i1.ytimg.com/vi/L7wk0bqAOSA/default.jpg",
    "http://jmods.ru/files/other/antivirus.png");

$yt_links = array(
    "http://youtu.be/Y2tkLuq5qTc",
    "http://www.youtube.com/watch?v=KHF65RQaX4M",
    "http://www.youtube.com/watch?v=2eb338EDxhI",
    "http://www.youtube.com/watch?v=UtexQYYeVoQ",
    "http://www.youtube.com/watch?v=RfMl4UMT04Y",
    "http://www.youtube.com/watch?v=L7wk0bqAOSA",
    "http://www.youtube.com/user/antivirus977/videos");

$yt_texts = array(
    "Запуск игр с PSX на Symbian OS 9",
    "MaxPayne2",
    "FPS Creator X10",
    "Streets of Rage",
    "Gangstar Rio: City",
    "Gangstar Rio: City",
    "AntiVirus ConsolGame Channel - Okay, I'm play it!");

$yt_title = array(
    "Jafadan обучает:",
    /*"antivirus играет:",
    "antivirus интригует:",
    "antivirus ностальгирует:",
    "antivirus водит тачку:",
    "antivirus действует:",
    "antivirus показывает:"*/);

//Смешиваем массивы
shuffle($yt_number);

echo '<div class="smenu">' . '<div align="center"><a href="' . $yt_links[$yt_number[0]] .
    '">' . $yt_title[$yt_number[0]] . '<br/><img src="' . $yt_images[$yt_number[0]] .
    '" /><br/>' . $yt_texts[$yt_number[0]] . '</a></div>' .
    '<hr/><div align="center"><a href="' . $yt_links[$yt_number[1]] . '">' . $yt_title[$yt_number[1]] .
    '<br/><img src="' . $yt_images[$yt_number[1]] . '" /><br/>' . $yt_texts[$yt_number[1]] .
    '</a></div></div>';



// Онлайн
echo '<div class="smenu">' . counters::online() . '';

// Счетчики каталогов
echo '<center>';
functions::display_counters();
echo '</center></div>';

?>